package org.credo.thread.Condition;

/**
 * 取钱的线程操作类.
 */
public class GetMoneyThread extends Thread{
	private Account account;
	private double getMoney;
	
	public GetMoneyThread(String name,Account account,double getmoney){
		super.setName(name);
		this.account=account;
		this.getMoney=getmoney;
	}
	
	@Override
	public void run() {
		for(int i=0;i<15;i++){
			account.getMoney(getMoney,i);
		}
	}
	
	public Account getAccount() {
		return account;
	}
	public void setAccount(Account account) {
		this.account = account;
	}
	public double getGetMoney() {
		return getMoney;
	}
	public void setGetMoney(double getMoney) {
		this.getMoney = getMoney;
	}
}
